import request from '@/utils/request'

// 补货阙值获取
export const supplyAlertValue = () => {
  return request({
    // 路径拼接请求
    url: '/api/task-service/task/supplyAlertValue',
    method: 'get'
  })
}
// 修改补货阙值
export const autoSupplyConfig = (alertValue) => {
  return request({
    // 路径拼接请求
    url: '/api/task-service/task/autoSupplyConfig',
    method: 'POST',
    data: {
      alertValue
    }
  })
}
// 获取所有工单类型
export const getListType = () => {
  return request({
    // 路径拼接请求
    url: '/api/task-service/taskType/list',
    method: 'get'
  })
}
// 根据售货机获取运营人员列表
export const operatorList = (innerCode) => {
  return request({
    // 路径拼接请求
    url: `/api/user-service/user/repairerList/${innerCode}`,
    method: 'get'
  })
}
// 补货详情
export const taskDetails = (taskId) => {
  return request({
    // 路径拼接请求
    url: `/api/task-service/taskDetails/${taskId}`,
    method: 'get'
  })
}
// 补货详情
export const taskDetailsAPI = (taskId) => request({
  url: `/api/task-service/taskDetails/${taskId}`
})
// 获取售货机货道详情
export const channelList = (innerCode) => request({
  url: `/api/vm-service/channel/channelList/${innerCode}`
})
// 创建工单
export const createlList = (data) => request({
  url: `/api/task-service/task/create`,
  method: 'POST',
  data
})
// 获取详情

export const taskInfoAPI = (taskId) => request({
  url: `/api/task-service/task/taskInfo/${taskId}`
})
